<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    /**
     * Display a listing of the resource.
     * 后台首页
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $data =  [
            [
                'id' => 'menu-article',
                'title' => '资讯管理',
                'icon' => '620',
                'url' => '/menu/article',
                'child' => [
                    [
                        'ctitle' => '资讯管理',
                        'curl' => '/admin/list',
                    ]
                ]
            ],
            
        ]
        
        
        
        $asides = ['资讯管理'=>['/admin/alist'=>'资讯管理'],
            '图片管理'=>['图片管理'],
            '产品管理'=>['品牌管理','分类管理','产品管理'],
            '评论管理'=>['评论列表','意见反馈'],
            '会员管理'=>['会员列表','删除的会员','等级管理','积分管理','浏览记录','下载记录'],
            '管理员管理'=>['角色管理','权限管理','管理员列表']
        ];
        return view('admin.index.index',compact('asides'));
    }

    public function welcome()
    {
        $datas=[
            'ip'=>$_SERVER['REMOTE_ADDR'],
            'file'=>__FILE__,
            'time'=>date('Y-m-d H:i:s',time()),
        ];
        return view('admin.index.welcome',compact('datas'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }
}
